#include <iostream>
#include "user.h"
#include "manager.h"
using namespace std;

#include "test.h"


int main(int argc, const char* argv[])
{
    // Test_User tmpTestUser;

    UserManager tmpManager;

    string tmpName, tmpPd;
    int ret;

    tmpManager.load_UserFromFile();

    cout << "请输入新用户名:";cin >> tmpName;
    cout << "请输入密码:";cin >> tmpPd;
    ret = tmpManager.user_register(tmpName, tmpPd);
    if (ret < 0)
    {
        cout << "该用户名已存在!" << endl;
    }
    else
    {
        cout << "用户创建成功" << endl;
        tmpManager.save_UserToFile();
    }
    return 0;
}

